<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>权益商城</title>

  <link rel="stylesheet" href="/layui/css/layui.css">
  <link rel="stylesheet" href="/khlist/css/common.css">
  <link rel="stylesheet" href="/khlist/css/manager.css">
  <link rel="stylesheet" href="/hyqcss/public.css">
</head>
<style type="text/css">
  /*------------分页部分--------------*/
    .pageing-container-h{
      display: flex;
      justify-content: space-between;
      padding: 0px 20px 20px 20px;
    }
    .pageing-content-h{
      line-height: 28px;
    }
    .pageing-content-h a{
      border: 1px solid #e2e2e2;
      padding: 4px 15px;
      color: #333;
      line-height: 28px;
      border-radius: 2px;
    }
   .current{
     background: #1E9FFF !important;
     color: #fff !important;
   }
</style>
<body>

  <div class="layui-tab layui-tab-brief client-manager" lay-filter="" style="margin: 20px;">
    <ul class="layui-tab-title">
      <li class="layui-this">商品列表</li>
      <!-- <li>所在群聊筛选</li> -->
    </ul>
    <div class="layui-tab-content">
      <!-- 客户属性筛选 -->
      <div class="layui-tab-item layui-show">
        <!-- 筛选form -->
        <form class="layui-form client-filter" action="">
          <div class="layui-inline">
            <label class="layui-form-label">搜索商品：</label>
            <div class="layui-input-inline">
              <input type="text" name="name" value="{$product_where['goods_name@~']}" placeholder="请输入商品名" autocomplete="off" class="layui-input" style="padding-right: 24px;">
            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label">商品编号：</label>
            <div class="layui-input-inline">
              <input type="text" name="productId" value="{$product_where['product_id@~']}" placeholder="请输入编号" autocomplete="off" class="layui-input" style="padding-right: 24px;">
            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label">订单号：</label>
            <div class="layui-input-inline">
              <input type="text" name="orderId" value="{$where['order_id@~']}" placeholder="请输入编号" autocomplete="off" class="layui-input" style="padding-right: 24px;">
            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label">订单状态：</label>
            <div class="layui-input-inline">
              <select name="status">
                <option value="">请选择状态</option>
                {loop $order_status as $k => $status}
                 <option value="{$k}" {if $where['status'] == $k}selected{/if}>{$status}</option>
                {/loop}
              </select>
            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label"></label>
            <div class="layui-input-inline">
              <button class="layui-btn layui-btn-normal" lay-submit lay-filter="">查询</button>
              <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
          </div>

        </form>
        <!-- table -->
        <div class="client-container">
          <div class="flex align-items-center" style="padding: 20px 30px;">
            <div class="flex-1">
              <strong>共{$p->totalnum}个订单</strong>
              <span class="layui-breadcrumb" lay-separator="|" style="margin-left: 20px;">
              </span>
            </div>
          </div>
          <div class="mcheckbox-table" style="padding: 0 16px; overflow: hidden;">
            <table class="layui-table" lay-filter="clientTable" lay-skin="row">
              <colgroup>
                <col>
                <col>
                <col>
                <col>
                <col>
                <col>
                <col>
                <col>
              </colgroup>
              <thead>
                <tr>
                  <th>商品编号</th>
                  <th>商品名称</th>
                  <th>订单编号</th>
                  <th>下单金额</th>
                  <th>充值账号</th>
                  <!-- <th lay-data="!{field:'card'}">卡密</th> -->
                  <th>订单状态</th>
                  <th>下单时间</th>
                  <th>完成时间</th>
<!--                   <th lay-data="!{field:'s'}">操作</th> -->
                </tr> 
              </thead>
              <tbody>
                {loop $res as $re}
                <tr>
                  <td>{$re->product->product_id}</td>
                  <td>{$re->product->goods_name}</td>
                  <td>{$re->order_id}</td>
                  <td>￥ {$re->amount}</td>
                  <td>
                     {if $re->param}
                      {loop $re->param as $param}
                        {$param}
                      {/loop}
                     {/if}
                  </td>
                  <!-- <td><span style="color: blue;">查看卡密</span></td> -->
                  <td>{$order_status[$re->status]}</td>
                  <td>{date("Y-m-d H:i:s",$re->ctime)}</td>
                  <td>{$re->finish_at}</td>
                  <!-- <td>{$re->status == 1 ? '<span style="color: #00cc6e;">上架</span>' : '<span style="color: red;">下架</span>'}</td> -->
              <!--     <td>
                    <button class="layui-btn layui-btn-primary"><a href="javascript:;" class="table-public-btn" onclick="place_order({$re->id})">下单</a></button>
                  </td> -->
                </tr>
                {/loop}
              </tbody>
            </table>
          </div>
          <div class="main-container-h pageing-container-h">
          <div class="pageing-content-h">
               <span>{$p->totalnum}条/{$p->totalpage}页</span>
          </div>
          <ul class="pageing-content-h">{P weidogsadmin}</ul>
          </div>
        </div>
      </div>
      <div class="layui-tab-item">内容2</div>
    </div>
  </div>

  <script src="/js/jquery.min.js"></script>
  <script src="/khlist/js/layui.all.js"></script>
  <script src="/khlist/js/common.js"></script>
  <script src="/red/lib/jquery-3.1.0.min.js"></script>
  <script src="/red/lib/layui.js"></script>
  <script src="/js/ajax.js"></script>
<script>
    var selectedClients = {}
    layui.use('table', function(){
      var table = layui.table;
      
      table.on('checkbox(clientTable)', function(obj){
         console.log(obj.data.length);
        if (obj.checked) {
          // selectedClients[obj.data.用户id] = obj.data
          selectedClients['1'] = obj.data
        } else {
          // delete selectedClients[obj.data.用户id]
          delete selectedClients['1']
        }
      })
    })

    layui.use('laydate', function(){
      var laydate = layui.laydate;

      //日期范围
      laydate.render({ elem: '#addTime' ,range: true })
    })


    // 确定
    $('.tags-panel-confirm').on('click', function() {
      var $tags = $('.tags-panel-item.on')
      var html = ''
      for (var i = 0, l = $tags.length; i < l; i++) {
        html += '<span class="layui-badge-rim filter-tag">' + $tags[i].innerText + '<i class="layui-icon layui-icon-close"></i></span>'
      }
      if (!html) {
        html += '<span class="placeholder">请选择标签</span>'
      }
      $('.tags-filter-content').html(html)
      layer.close(layer.index)
    })
  

</script>

</body>
</html> 